/*
The analyses are organized for the specific results discussed
in the section titled: 

Do experience and training matter?
*/

use "../Metadata/tess_analysisdata.dta", clear
	
	
** Faculty status 
	gen faculty = (title == 3 | title == 4 | title == 5)
	
	*faculty vs. non-faculty counts -- 51. vs. 49
	ta faculty if hyp_num==1
	
	*non-faculty composition
	tab title if faculty==0 & hyp_num==1
	
	*rate of positive study results -- 64.7% vs. 42.8%
	prtest successfulexp_insample if hyp_num == 1, by(faculty)
	
	*rate of supported hypotheses by faculty status	-- 27% vs. 20.7%
	prtest hyp_true if insample == 1, by(faculty)

	*median sample size by faculty status -- 829 vs. 997
	table faculty if insample==1, stat(median N_person)

	*rate of pilots by faculty status -- 68.6% vs. 83.7%
	prtest pilot if hyp_num==1, by(faculty)

	
** Multi-authored proposals

	cap drop multiauthor
	gen multiauthor = numauthors > 1 if numauthors < .
	
	*study-level positive results -- 67.9% vs. 48.6%
	prtest successfulexp_insample if hyp_num == 1, by(multiauthor)

	* hypotheses supported -- 28.7% vs. 21.8%
	prtest hyp_true if insample == 1, by(multiauthor)
	


** Disciplinary background

	cap drop polisci
	gen polisci = (discipline == 5)

	* percent of studies from pol sci. -- 43%
	ta polisci if hyp_num==1

	* more studies from pol sci. led by faculty -- 67.4% vs. 38.6%
	prtest faculty if hyp_num == 1, by(polisci)
	 
	* pol sci. exps have fewer positive study results -- 46.5% vs. 59.6%
	prtest successfulexp_insample if hyp_num == 1, by(polisci)
	
	* pol sci. exps have fewer supported hypotheses -- 15.7% vs. 28.1%	
	prtest hyp_true if insample == 1, by(polisci)

	* pol sci sample sizes smaller -- 781 vs. 1024
	table polisci if insample==1, stat(median N_person)



